//fncallback 回调函数
function ajax(url, fncallback,errorcallback) {
	var xhr = new XMLHttpRequest();
	xhr.open('GET', url, true);
	xhr.send(null);
	xhr.onload = function() {
		if(xhr.status == 200) {
			var jsonStr = xhr.responseText;
			fncallback(jsonStr);
		}else{
			errorcallback();
		}
	}
}